package com.clement.spring.study.math;

import java.math.BigDecimal;
import java.math.BigInteger;
import java.math.RoundingMode;

/**
 * This is just a experimentation of BigInteger.
 */

public class BigIntegerExperiment {

    static BigInteger bigInteger1 = new BigInteger("2222222222222222");
    static BigInteger bigInteger2 = new BigInteger("4444444444444444");
    static BigDecimal bigDecimal1 = new BigDecimal("12344.21313");
    static BigDecimal bigDecimal2 = new BigDecimal("1234354.2344333");

    public static void main(String[] args) {
        BigInteger addResult = bigInteger1.add(bigInteger2);
        BigDecimal addDecimal = bigDecimal1.setScale(2,BigDecimal.ROUND_UP);
        System.out.println(addDecimal);
    }


}
